package com.mzj.saas.mservice.sys.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/*
*商户号信息管理表
 */
@Entity
@Table(name = "wechat_account")
public class WechatAccount extends IdEntity{

    /**
     * 企业Id
     */
    @Column(name = "org_id", nullable = true)
    private Long orgId;
    /**
     * 类型：1微信 2支付宝
     */
    @Column(name = "type", nullable = true)
    private Integer type;

    /**
    * 商户号ID
    */
    @Column(name = "mch_id", nullable = true)
    private String mchId;
    /**
    * 商户号api秘钥
    */
    @Column(name = "mch_api_key", nullable = true)
    private String mchApiKey;
    /**
    * 商户证书文件
    */
    @Column(name = "mch_certificate", nullable = true)
    private byte[] mchCertificate;
    /**
    * 创建人ID
    */
    @Column(name = "creator_id", nullable = true)
    private String creatorId;
    /**
    * 创建时间
    */
    @Column(name = "create_time", nullable = true)
    private Date createTime;
    /**
    * 最后修改时间
    */
    @Column(name = "last_update_time", nullable = true)
    private Date lastUpdateTime;
    /**
    * 备注
    */
    @Column(name = "remark", nullable = true)
    private String remark;
    /**
    * 商户号公钥
    */
    private byte[] mchPublicPem;
    
    /**
     * 支付宝公钥
     */
    private String publicKey;
    
    /**
     * 支付宝密钥
     */
    private String privateKey;
    
    
    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }
    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public String getMchApiKey() {
        return mchApiKey;
    }

    public void setMchApiKey(String mchApiKey) {
        this.mchApiKey = mchApiKey;
    }
    @Basic
    @Column(
            name = "mch_certificate",
            nullable = true,
            columnDefinition = "blob"
    )
    public byte[] getMchCertificate() {
        return mchCertificate;
    }

    public void setMchCertificate(byte[] mchCertificate) {
        this.mchCertificate = mchCertificate;
    }

    public String getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(String creatorId) {
        this.creatorId = creatorId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
    @Basic
    @Column(
            name = "mch_public_pem",
            nullable = true,
            columnDefinition = "blob"
    )
    public byte[] getMchPublicPem() {
        return mchPublicPem;
    }

    public void setMchPublicPem(byte[] mchPublicPem) {
        this.mchPublicPem = mchPublicPem;
    }
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Column(columnDefinition="text")
	public String getPublicKey() {
		return publicKey;
	}

	public void setPublicKey(String publicKey) {
		this.publicKey = publicKey;
	}

	@Column(columnDefinition="text")
	public String getPrivateKey() {
		return privateKey;
	}

	public void setPrivateKey(String privateKey) {
		this.privateKey = privateKey;
	}
}
